Skip to content

Add update array tests for $push#598

Open
vic-tsang wants to merge 2 commits into
documentdb:mainfrom
vic-tsang:array/push/tests
Open

Add update array tests for $push#598
vic-tsang wants to merge 2 commits into
documentdb:mainfrom
vic-tsang:array/push/tests

Conversation

@vic-tsang

Copy link
Copy Markdown
Collaborator

This PR contains:

  • update array tests for $push

Ref:

Signed-off-by: Victor [C] Tsang <vitsangp@amazon.com>
@vic-tsang vic-tsang requested a review from a team as a code owner June 11, 2026 23:19
@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels Jun 11, 2026
@documentdb-triage-tool

Copy link
Copy Markdown

🤖 Auto-triaged by documentdb-triage-tool.

Applied: compatibility test, enhancement
Project fields suggested: Component test-coverage · Priority P2 · Effort L · Status Needs Review
Confidence: 0.85 (mixed)

Reasoning

component from path globs (test-coverage, test-framework); effort from diff stats (471+0 LOC, 7 files); LLM: Adds new compatibility test cases for the $push array update operator, expanding test coverage in the tests directory.

If a label is wrong, remove it manually and ping @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.

Signed-off-by: Victor [C] Tsang <vitsangp@amazon.com>

def test_push_updateOne_result(collection):
"""Test $push with updateOne produces correct document."""
collection.insert_one({"_id": 1, "arr": [1]})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have multiple values and then verify. it has only one value


def test_push_updateOne_response(collection):
"""Test $push with updateOne reports correct response."""
collection.insert_one({"_id": 1, "arr": [1]})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add muliple value then update

+ MODIFIER_WITHOUT_EACH_TESTS
)


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will $each work here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compatibility test Compatibility test related enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants